package com.example.javamaday.encrypt_decrypt;

/**
 * Byte 和 bit 换算 Demo
 */
public class ByteBitDemo {

    public static void main(String[] args) {
        //String a = "a";
        String a = "零";
        byte[] bytes = a.getBytes();
        for (byte aByte : bytes) {
            int c = aByte;
            System.out.println(c);
            // byte 对应的 bit 为：
            String binaryString = Integer.toBinaryString(c);
            System.out.println(binaryString);
        }
    }





}
